/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dahg.project.istu.web.menu;

import com.dahg.project.istu.controller.model.Menu;
import org.primefaces.model.menu.DefaultMenuItem;

/**
 *
 * @author dahg
 */
public class MenuItem extends DefaultMenuItem {
    
    private final Menu menu;
    
    public MenuItem(Menu menu) {
        super(menu.getDescripcion(), menu.getIcon());
        setId(menu.getId());        
        setCommand(menu.getTarget());
        this.menu=menu;
    }
    
    public Menu getMenu() {
        return menu;
    }
}
